/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const officeRouter = {
  path: '/office',
  component: Layout,
  name: '组织架构',
  meta: {
    title: '组织架构',
    icon: 'menu_office',
    permissions: ['system'],
  },

  children: [
    // {
    //   path: '/sysOffice/list',
    //   component: () => import('@/views/sysOffice/list'),
    //   name: 'sysOffice-list',
    //   meta: { title: '公司部门' ,icon: 'menu_sysOffice',permissions:['sysOffice.query']}
    // },
    // {
    //   path: '/sysOffice/add',
    //   component: () => import('@/views/sysOffice/add'),
    //   name: 'sysOffice-add',
    //   meta: { title: '新增组织' ,icon: 'menu_sysOffice'},
    //   hidden: true
    // },
    // {
    //   path: '/sysOffice/edit',
    //   component: () => import('@/views/sysOffice/edit'),
    //   name: 'sysOffice-edit',
    //   meta: { title: '修改组织' ,icon: 'menu_sysOffice', noCache:true},
    //   hidden: true
    // },
    // {
    //   path: '/sysPost/list',
    //   component: () => import('@/views/sysPost/list'),
    //   name: 'sysPost-list',
    //   meta: { title: '岗位管理' ,icon: 'menu_sysPost',permissions:['sysPost.query']}
    // },
    // {
    //   path: '/sysPost/add',
    //   component: () => import('@/views/sysPost/add'),
    //   name: 'sysPost-add',
    //   meta: { title: '新增岗位' ,icon: 'menu_sysPost'},
    //   hidden: true
    // },
    // {
    //   path: '/sysPost/edit',
    //   component: () => import('@/views/sysPost/edit'),
    //   name: 'sysPost-edit',
    //   meta: { title: '修改岗位' ,icon: 'menu_sysPost'},
    //   hidden: true
    // },
    {
      path: '/sysEmployee/list',
      component: () => import('@/views/sysEmployee/list'),
      name: 'sysEmployee-list',
      meta: { title: '员工管理' ,icon: 'menu_sysEmployee',
      permissions:['sysEmployee']
    }
    },
    {
      path: '/sysEmployee/add',
      component: () => import('@/views/sysEmployee/add'),
      name: 'sysEmployee-add',
      meta: { title: '新增员工' ,icon: 'menu_sysEmployee'},
      hidden: true
    },
    {
      path: '/sysEmployee/edit',
      component: () => import('@/views/sysEmployee/edit'),
      name: 'sysEmployee-edit',
      meta: { title: '修改员工' ,icon: 'menu_sysEmployee'},
      hidden: true
    },
    {
      path: '/sysRole/list',
      component: () => import('@/views/sysRole/list'),
      name: 'sysRole-list',
      meta: { title: '角色管理' ,icon: 'menu_sysRole',
      permissions:['sysRole']
    }
    },
    {
      path: '/sysUser/list',
      component: () => import('@/views/sysUser/list'),
      name: 'sysUser-list',
      meta: { title: '用户权限' ,icon: 'menu_sysUser',
      permissions:['sysUser']
    }
    },
    {
      path: '/sysDict/list',
      component: () => import('@/views/sysDict/list'),
      name: 'sysDict-list',
      meta: {
        title: '字典管理', icon: 'menu_sysMch',
        permissions: ['system.xdict']
      }
    },


    // 注册路由
    {
      path: '/sysMenu/list',
      component: () => import('@/views/sysMenu/list'),
      name: 'sysMenu-list',
      meta: { title: '菜单管理', subtitle: '菜单', icon: 'menu_sysMenu', permissions: ['system.menu']},

      // hidden: true
    },
    // {
    //   path: '/sysMenu/add',
    //   component: () => import('@/views/sysMenu/add'),
    //   name: 'sysMenu-add',
    //   meta: { title: '新增菜单', icon: 'menu_sysMenu', permissions: ['system.menu'] },
    //   hidden: true
    // },
    // {
    //   path: '/sysMenu/edit',
    //   component: () => import('@/views/sysMenu/edit'),
    //   name: 'sysMenu-edit',
    //   meta: { title: '修改菜单', icon: 'menu_sysMenu', permissions: ['system.menu'] },
    //   hidden: true
    // },
    {
      path: '/sysMch/list',
      component: () => import('@/views/sysMch/list'),
      name: 'sysMch-list',
      meta: { title: '插件管理', icon: 'menu_sysMch',
        permissions: ['system.plugin']
      }
    },
    {
      path: '/sysPlugin/list',
      component: () => import('@/views/sysPlugin/list'),
      name: 'sysPlugin-list',
      meta: { title: '插件管理', icon: 'menu_system',
        permissions: ['system.plugin']
      },
      hidden: true
    },

    // 注册路由
    {
      path: '/sysMch/list',
      component: () => import('@/views/sysMch/list'),
      name: 'sysMch-list',
      meta: { title: '系统管理', subtitle: '菜单', icon: 'menu_sysMenu',  permissions: ['admin']},
      hidden: true
    },
    {
      path: '/sysMenu/add',
      component: () => import('@/views/sysMenu/add'),
      name: 'sysMenu-add',
      meta: { title: '新增菜单', icon: 'menu_sysMenu' },
      hidden: true
    },
    {
      path: '/sysMenu/edit',
      component: () => import('@/views/sysMenu/edit'),
      name: 'sysMenu-edit',
      meta: { title: '修改菜单', icon: 'menu_sysMenu' },
      hidden: true
    },

  ]
}
export default officeRouter
